]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: Add a toggle-message-tray keybinding to toggle the tray
authorDebarshi Ray <debarshir@gnome.org>
Sat, 14 Jul 2012 11:07:24 +0000 (13:07 +0200)
committerDebarshi Ray <debarshir@gnome.org>
Wed, 8 Aug 2012 23:36:24 +0000 (01:36 +0200)
The default value is <Super>m.

https://bugzilla.gnome.org/show_bug.cgi?id=681392

data/org.gnome.shell.gschema.xml.in.in
js/ui/messageTray.js

index ac4a1e31d5a5e5af570d9ff21ccd2ba4c88824a5..866732f085cc37dace025ce0c8ddf31e94a55016 100644 (file)
@@ -87,6 +87,13 @@ value here is from the GsmPresenceStatus enumeration.</_summary>
         Keybinding to open the application menu.
       </_description>
     </key>
+    <key name="toggle-message-tray" type="as">
+      <default>["&lt;Super&gt;m"]</default>
+      <_summary>Keybinding to toggle the visibility of the message tray</_summary>
+      <_description>
+        Keybinding to toggle the visibility of the message tray.
+      </_description>
+    </key>
     <key name="toggle-recording" type="as">
       <default><![CDATA[['<Control><Shift><Alt>r']]]></default>
       <_summary>Keybinding to toggle the screen recorder</_summary>
index 3c6a216aa2ef8278894e59c3aa7a740c93282b22..c71d7f64e027d2fb3455879742fb5c8657c10757 100644 (file)
@@ -21,6 +21,8 @@ const Params = imports.misc.params;
 const Tweener = imports.ui.tweener;
 const Util = imports.misc.util;
 
+const SHELL_KEYBINDINGS_SCHEMA = 'org.gnome.shell.keybindings';
+
 const ANIMATION_TIME = 0.2;
 const NOTIFICATION_TIMEOUT = 4;
 const SUMMARY_TIMEOUT = 1;
@@ -1592,6 +1594,11 @@ const MessageTray = new Lang.Class({
         this._isScreenLocked = false;
         Main.screenShield.connect('lock-status-changed', Lang.bind(this, this._onScreenLockStatusChanged));
 
+        global.display.add_keybinding('toggle-message-tray',
+                                      new Gio.Settings({ schema: SHELL_KEYBINDINGS_SCHEMA }),
+                                      Meta.KeyBindingFlags.NONE,
+                                      Lang.bind(this, this.toggle));
+
         this._summaryItems = [];
         // We keep a list of new summary items that were added to the summary since the last
         // time it was shown to the user. We automatically show the summary to the user if there